using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Antlr.Runtime.Tree;
using Antlr.Runtime;

namespace NeuroSpeech.Imap
{
	public class ImapResponseList : BaseImapResponse
	{
		public List<string> Folders { get; private set; }

		public override void Process(ImapClient client)
		{
			base.Process(client);

			Folders = new List<string>();

			foreach (var item in Lines)
			{
				var tree = Parse(item);

				// 4th item is name..
				var  ftree = tree.GetChild(4);
				string folder = ftree.Text;

				Folders.Add(folder);
			}
		}


	}
}
